package com.qinggeng.project.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.qinggeng.framework.aspectj.lang.annotation.Excel;
import lombok.Data;
import com.qinggeng.framework.web.domain.BaseEntity;

/**
 * 订单地址对象 orders_address
 * 
 * @author qinggeng
 * @date 2020-06-17
 */
@Data
public class OrdersAddress extends BaseEntity
{

    /** 订单地址ID */
    private Long ordersAddressId;

    /** 收货人姓名 */
    @Excel(name = "收货人姓名")
    private String consignee;

    /** 收货地区 */
    @Excel(name="地址地区")
    private String addressName;

    /** 手机号 */
    @Excel(name = "手机号")
    private String addressPhone;

    /** 收货地址 */
    @Excel(name = "收货地址详细地址")
    private String addressInfo;

    /** 门牌号 */
    @Excel(name = "门牌号")
    private String addressHouse;

    /** 地址标签 */
    @Excel(name = "地址标签")
    private Integer addressMark;

    /** 性别 10=男 20=女 */
    @Excel(name = "性别 10=男 20=女")
    private String sex;

    /** 经度 */
    @Excel(name = "经度")
    private Float addressLng;

    /** 纬度 */
    @Excel(name = "纬度")
    private Float addressLat;

    /** 订单ID */
    @Excel(name = "订单ID")
    private Long ordersId;

    /** 地址ID */
    @Excel(name = "地址ID")
    private Long addressId;
    /** 距离 */
    private Double distance;

    public OrdersAddress(){

    }

    public Long getOrdersAddressId() {
        return ordersAddressId;
    }

    public void setOrdersAddressId(Long ordersAddressId) {
        this.ordersAddressId = ordersAddressId;
    }

    public String getAddressName() {
        return addressName;
    }

    public void setAddressName(String addressName) {
        this.addressName = addressName;
    }

    public String getAddressPhone() {
        return addressPhone;
    }

    public void setAddressPhone(String addressPhone) {
        this.addressPhone = addressPhone;
    }

    public String getAddressInfo() {
        return addressInfo;
    }

    public void setAddressInfo(String addressInfo) {
        this.addressInfo = addressInfo;
    }

    public String getAddressHouse() {
        return addressHouse;
    }

    public void setAddressHouse(String addressHouse) {
        this.addressHouse = addressHouse;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Float getAddressLng() {
        return addressLng;
    }

    public void setAddressLng(Float addressLng) {
        this.addressLng = addressLng;
    }

    public Float getAddressLat() {
        return addressLat;
    }

    public void setAddressLat(Float addressLat) {
        this.addressLat = addressLat;
    }

    public Long getOrdersId() {
        return ordersId;
    }

    public void setOrdersId(Long ordersId) {
        this.ordersId = ordersId;
    }

    public Long getAddressId() {
        return addressId;
    }

    public void setAddressId(Long addressId) {
        this.addressId = addressId;
    }

    public Double getDistance() {
        return distance;
    }

    public void setDistance(Double distance) {
        this.distance = distance;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    public Integer getAddressMark() {
        return addressMark;
    }

    public void setAddressMark(Integer addressMark) {
        this.addressMark = addressMark;
    }

    public OrdersAddress(UserAddress userAddress){
        this.consignee=userAddress.getConsignee();
        this.addressName = userAddress.getAddressName();
        this.addressPhone = userAddress.getAddressPhone();
        this.addressInfo = userAddress.getAddressInfo();
        this.addressHouse = userAddress.getAddressHouse();
        this.addressMark=userAddress.getAddressMark();
        this.sex = userAddress.getSex();
        this.addressLng = userAddress.getAddressLng();
        this.addressLat = userAddress.getAddressLat();
        this.addressId = userAddress.getAddressId();
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("ordersAddressId", getOrdersAddressId())
                .append("consignee",getConsignee())
            .append("addressName", getAddressName())
            .append("addressPhone", getAddressPhone())
            .append("addressInfo", getAddressInfo())
            .append("addressHouse", getAddressHouse())
                .append("addressMark",getAddressMark())
            .append("sex", getSex())
            .append("addressLng", getAddressLng())
            .append("addressLat", getAddressLat())
            .append("ordersId", getOrdersId())
            .append("addressId", getAddressId())
            .toString();
    }
}
